/*
 * Copyright (c) 2011-2022, baomidou (jobob@qq.com).
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.baomidou.mybatisplus.advance.query.enums;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;

/**
 * 排序枚举
 * @author wanglei
 * @since 2022-03-14
 */
@ApiModel(
        description = "排序枚举"
)
@Schema(title = "排队枚举")
public enum DirectionEnum {
    @ApiModelProperty(
            name = "ASC",
            notes = "升序"
    )
    @Schema(description = "升序" , name = "ASC",title = "升序")
    ASC,
    @ApiModelProperty(
            name = "DESC",
            notes = "降序"
    )
    @Schema(description = "降序" , name = "DESC",title = "降序")
    DESC;

    private DirectionEnum() {
    }

    public static DirectionEnum fromString(String value) {
        try {
            return valueOf(value.toUpperCase());
        } catch (Exception var2) {
            return ASC;
        }
    }
}
